<div class="container">
  <section>
    <h2 class="clearfix">
      部门管理
      <div class="pull-right">
        <a href="" ng-click="formShow = true">
          <small class="text-primary">
            <i class="fa fa-plus"></i>
            添加部门
          </small>
        </a>
      </div>
    </h2>
    <form ng-show="formShow" ng-submit="create()">
      <div class="input-group">
        <input type="text" class="form-control" ng-model="department.name" placeholder="在这里输入投票内容">
            <span class="input-group-btn">
              <button class="btn btn-info" type="submit">保存</button>
            </span>
      </div><!-- /input-group -->
    </form>

    <br/>
    <ul class="list-group">
      <li class="list-group-item" ng-repeat="department in departments">
        <strong>{{department.name}}</strong>
        <a ng-click="delete(department._id, $index)" class="trash pull-right" tooltip="删除" href="">&nbsp;<span class="glyphicon glyphicon-trash"></span>&nbsp;</a>
      </li>
    </ul>

  </section>
</div>
